// components/recommend/recommend.js
import { feach } from "../../http/http";
Component({
  /**
   * 组件的属性列表
   */
  properties: {},

  /**
   * 组件的初始数据
   */
  data: {
    commendList: []
  },

  /**
   * 组件的方法列表
   */
  methods: {
    getCommendList() {
      feach("/product/recommend").then(res => {
        // console.log(res);
        this.setData({
          commendList: res.data.data
        });
        // console.log(this.data.commendList);
      });
    }
  },
  created() {
    // console.log("----");
    this.getCommendList();
  }
});
